SciChart WPF 2D Charts > Axis APIs > Axis Ticks - High-Precision Scale
Axis Ticks - High-Precision Scale

High-Precision Axis Scale

There are cases when data contains extraordinary small numeric values or a chart is required to allow deep zooming. Although SciChart copes with most of these cases pretty well, sometimes situations emerge when axes run out of ticks due to lack of precision. Since v6, SciChart provides additional configuration options to improve axis precision in these cases.

Allowing High-Precision Scale on NumericAxis

To enable high-precision scale on a NumericAxis you have to replace the default TickProvider by a custom one that would generate ticks for very small range spans. There is one present in SciChart called HighPrecisionNumericTickProvider.

It can be applied to the NumericAxis via the TickProvider property:

Enabling high-precision scale on a NumericAxis
Copy Code
    <UserControl.Resources>
         <s:HighPrecisionNumericTickProvider x:Key="HighPrecisionTickProvider" />
    </UserControl.Resources>
        <s:SciChartSurface>
            <!--  Create an X Axis with HighPrecisionTickProvider  -->
            <s:SciChartSurface.XAxis>
                <s:NumericAxis TickProvider="{StaticResource HighPrecisionTickProvider}" />
            </s:SciChartSurface.XAxis>
            <!--  Create an Y Axis with HighPrecisionTickProvider  -->
            <s:SciChartSurface.YAxis>
                <s:NumericAxis TickProvider="{StaticResource HighPrecisionTickProvider}" />
            </s:SciChartSurface.YAxis>
</s:SciChartSurface>
Enabling high-precision scale on a NumericAxis
Copy Code
 var axis = new NumericAxis();
 axis.TickProvider = new HighPrecisionNumericTickProvider();

More information about TickProviders can be found in the “Axis Ticks – TickProvider and DeltaCalculator API” article.

Allowing High-Precision Scale on LogarithmicNumericAxis

To enable high-precision scale on a LogarithmicNumericAxis you have to set the EnableHighPrecisionTicks property to “True” on the axis:

Enabling high-precision scale on a LogarithmicNumericAxis
Copy Code
            var axis = new LogarithmicNumericAxis();
            axis.EnableHighPrecisionTicks = true;
Enabling high-precision scale on a LogarithmicNumericAxis
Copy Code
        <s:SciChartSurface>
            <!--  Create a Logarithmic X Axis with high-precision scale -->
            <s:SciChartSurface.XAxis>
                <s:LogarithmicNumericAxis EnableHighPrecisionTicks="True" />
            </s:SciChartSurface.XAxis>
            <!--  Create a Logarithmic Y Axis with high-precision -->
            <s:SciChartSurface.YAxis>
                <s LogarithmicNumericAxis EnableHighPrecisionTicks="True" />
            </s:SciChartSurface.YAxis>
</s:SciChartSurface>

See Also